//
//  OIPublicOrgnationItem.m
//  EducationOID
//
//  Created by slz on 2017/6/5.
//  Copyright © 2017年 bnsr. All rights reserved.
//

#import "OIPublicOrgnationItem.h"

@implementation OIPublicOrgnationItem

- (MFWJson *)jsonForOrz_info{
    return [self jsonForKey:@"org_info"];
}

- (MFWJson *)jsonForVip_info{
    return [self jsonForKey:@"member_info"];
}

-(NSString *)orz_name{
    return [[self jsonForOrz_info] stringValueForKey:@"name"];
}
-(NSString *)orz_name_en{
    return [[self jsonForOrz_info] stringValueForKey:@"name_en"];
}
-(NSString *)orz_address{
    return [[self jsonForOrz_info] stringValueForKey:@"address"];
}
-(NSString *)orz_address_en{
    return [[self jsonForOrz_info] stringValueForKey:@"address_en"];
}
-(NSString *)orz_url{
    return [[self jsonForOrz_info] stringValueForKey:@"url"];
}
-(NSString *)orz_people_number{
    return [[self jsonForOrz_info] stringValueForKey:@"people_num"];
}
-(NSString *)orz_nature{
    NSString * type_string = @"个体";
    int type = [[self jsonForOrz_info] intValueForKey:@"type"];
    switch (type) {
        case 1:
            type_string = @"国家机关";
            break;
        case 2:
            type_string = @"标准化机构";
            break;
        case 3:
            type_string = @"社会团体";
            break;
        case 4:
            type_string = @"公司";
            break;
        default:
            type_string = @"个体";
            break;
    }
    return type_string;
}

-(NSString *)orz_phone_number{
    return [[self jsonForOrz_info] stringValueForKey:@"telephone"];
}

-(NSString *)orz_ceo_name{
    return [[self jsonForOrz_info] stringValueForKey:@"legal_people"];
}

-(NSString *)orz_short_number{
    return [[self jsonForOrz_info] stringValueForKey:@"zip_code"];
}
/*
@property (nonatomic,copy) NSString *vip_info_name;
@property (nonatomic,copy) NSString *vip_info_gender;
@property (nonatomic,copy) NSString *vip_info_position;
@property (nonatomic,copy) NSString *vip_info_address;
@property (nonatomic,copy) NSString *vip_info_email;
*/

-(NSString *)vip_info_name{
    return [[self jsonForVip_info] stringValueForKey:@"name"];
}

-(NSString *)vip_info_gender{
    NSString * gender_string = @"女";
    int type = [[self jsonForVip_info] intValueForKey:@"gender"];
    switch (type) {
        case 1:
            gender_string = @"男";
            break;
        case 2:
            gender_string = @"女";
            break;
        default:
            gender_string = @"女";
            break;
    }
    return gender_string;
}

-(NSString *)vip_info_position{
    return [[self jsonForVip_info] stringValueForKey:@"position"];
}

-(NSString *)vip_info_address{
    return [[self jsonForVip_info] stringValueForKey:@"address"];
}

-(NSString *)vip_info_email{
    return [[self jsonForVip_info] stringValueForKey:@"email"];
}

@end
















